<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="pc/include :: header('我的账户')" />

    <link th:href="@{/js/ui-table/ui-table.css}" rel="stylesheet"/>
</head>
<body>
<th:block th:include="pc/include :: top" />
<style>
    .ui-btn{
        margin: 120px auto auto 200px;
        width: 100px;
    }
</style>
<div class="iw">
    <div class="crumbs">
        <p>当前位置：<a href="/">首页</a> > <a href="/user/center">个人中心</a> > 我的账号</p>
    </div>
    <div class="center_left">
        <th:block th:include="pc/include :: menu" />
    </div>
    <div class="center_right">
        <div class='ui-text-group'>
            <label for="username">登录名：</label>
            <input id="username" name="username" type="text" th:value="${user.username}" class="ui-text disable"  disabled="disabled" />
            <lable></lable>
            <a href="/change" class="active">修改密码</a>
        </div>
        <div class='ui-text-group'>
            <label for="username">用户组：</label>
            <input id="groupname" name="groupname" type="text" th:value="${ugroup.groupname}" class="ui-text disable"  disabled="disabled" />
            <lable></lable>
            <a href="/user/group" class="active">升级用户组</a>
        </div>
        <div class='ui-text-group'>
            <label for="glods">余额(<span th:text="${tradeset.glodname}" th:remove="tag"></span>)：</label>
            <input id="glods" name="glods" type="text" th:value="${user.glods+tradeset.glodunit}" class="ui-text disable"  disabled="disabled" />
            <lable></lable>
            <a href="/user/glodpay" class="active">充值</a>
        </div>
        <div class='ui-text-group'>
            <label for="points">积分：</label>
            <input id="points" name="points" type="text" th:value="${user.points}" class="ui-text disable"  disabled="disabled" />
            <lable></lable>
            <a href="/user/change" class="active">兑换</a>
        </div>
        <div class='ui-text-group'>
            <label for="points">分成：</label>
            <input id="divide" name="divide" type="text" th:value="${ugroup.divide*100}" class="ui-text disable"  disabled="disabled" />
            <lable></lable>
            <a href="/user/cash" class="active">提现</a>
        </div>
        <div class='ui-text-group'>
            <label for="vipdate">VIP：</label>
            <input id="vipdate" name="points" type="text" th:value="${user.vipdate}?${#dates.format(user.vipdate, 'yyyy-MM-dd HH:mm:ss')}:'未开通'" class="ui-text disable"  disabled="disabled" />
            <lable></lable>
            <a href="/user/vip" class="active">开通 VIP</a>
        </div>
        <div class='ui-text-group'>
            <label for="iinvicode">邀请码：</label>
            <input id="iinvicode" name="iinvicode" type="text" th:value="${user.iinvicode}" class="ui-text disable"  disabled="disabled" />
            <lable></lable>
        </div>
        <div class='ui-text-group'>
            <label for="state">账号状态：</label>
            <input id="state" name="state" type="text" th:value="${user.state}?'正常':'禁止'" class="ui-text disable"  disabled="disabled" />
            <lable></lable>
        </div>
        <div class='ui-text-group'>
            <label for="regdate">注册日期：</label>
            <input id="regdate" name="regdate" type="text" th:value="${#dates.format(user.regdate, 'yyyy-MM-dd HH:mm:ss')}" class="ui-text disable"  disabled="disabled" />
            <lable></lable>
        </div>
        <form id="index-form" action="/user/account" method="post">
            <div class='ui-text-group'>
                <label for="nickname">昵称：</label>
                <input id="nickname" name="nickname" type="text" th:value="${user.nickname}" class="ui-text" data-valid data-must="请填写昵称"  data-length="1-8" />
                <lable>可以设置昵称</lable>
            </div>
            <div class='ui-text-group'>
                <label for="phone">手机：</label>
                <input id="phone" name="phone" type="text" th:value="${user.phone}" class="ui-text" data-valid data-reg="^1\d{10}$" data-reg-msg="请输入手机号" />
                <lable>设置手机号后,支持手机号登录</lable>
            </div>
            <div class='ui-text-group'>
                <label>性别：</label>
                <div class="ui-dropdown">
                    <div th:text="${user.sex}?${user.sex}:'未设置'"></div>
                    <ul style="display: none;">
                        <li data-val="男">男</li>
                        <li data-val="女">女</li>
                    </ul>
                    <input type="hidden" name="sex" th:value="${user.sex}" />
                    <i></i>
                </div>
            </div>
            <div class='ui-text-group'>
                <label for="address">地址：</label>
                <input id="address" name="address" type="text" th:value="${user.address}" class="ui-text" data-reg="^1\d{10}$" data-reg-msg="请输入地址" />
                <lable>设置详细地址</lable>
            </div>
        </form>
        <a class="ui-btn ui-btn-blue" submit-form={form:"#index-form",back:["保存成功","保存失败"]}>保存</a>
    </div>
</div>
<th:block th:include="pc/include :: footer" />
<script>
    $(function () {

    });
</script>